package br.indt.framework.ui.common;

import javax.microedition.lcdui.Graphics;

/**
 * Abstraction of a menu bar component.
 * 
 * @author Nokia Institute of Technology
 *
 */
public abstract class MenuBar extends Widget
{
	public MenuBar(String name)
	{
		super(name);
	}

	protected MenuItemListener menuItemListener = null;

	protected MenuItem rskItem = null;
	protected MenuItem lskItem = null;
	protected MenuItem mskItem = null;

	public void setMenuItemListener(MenuItemListener menuItemListener) {
		this.menuItemListener = menuItemListener;
	}

	public void setRSKItem(MenuItem menuItem) {
		rskItem = menuItem;
	}

	public void setLSKItem(MenuItem menuItem) {
		lskItem = menuItem;
	}

	public void removeLSKItem() {
		lskItem = null;
	}
	
	public void removeRSKItem() {
		rskItem = null;
	}
	
	public void removeMSKItem() {
		mskItem = null;
	}
	
	public void setMSKItem(MenuItem menuItem) {
		mskItem = menuItem;
	}

	public MenuItem getRSKItem() {
		return rskItem;
	}

	public MenuItem getLSKItem() {
		return lskItem;
	}

	public MenuItem getMSKItem() {
		return mskItem;
	}

	public abstract void paint(Graphics g, int x, int y, int maxWidth, int maxHeight);

	public void pressFire() {
	}
}